package com.ruoyi.jwyz;

import com.ruoyi.jwyz.dto.TargetUserResult;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class ceshiblacklist{


        @Test
        public void xxx(){
            List<TargetUserResult> list= new ArrayList<>();
            TargetUserResult result = new TargetUserResult();
            result.setTargetUserId(10002);
            result.setNickname("李四");
            list.add(0,result);
            result.setTargetUserId(10003);
            result.setNickname("小明");
            list.add(1,result);
            result.setTargetUserId(10005);
            result.setNickname("小明");
            list.add(2,result);
            System.out.println(list);
            List<Long> userIdList = new ArrayList<>();
            for (TargetUserResult results : list) {
                userIdList.add(results.getTargetUserId());
            }
            System.out.println(userIdList);
            long targetUserId = list.get(0).getTargetUserId();

        }
}
